<div dojoType="dijit.layout.ContentPane" class="workPane">
    <table width="100%">
        <tr>
            <td>
                <table>
                    <tr><td>
                            <span class="title-bar">
                    รายการล็อต</span>
                        </td><td>
                            &nbsp;&nbsp;
                        </td></tr>
                </table>
            </td>
            <td align="right">
                <div dojoType="dijit.form.TextBox" id='searchIngridTxtBox' placeHolder="ค้นหาจากรายการที่แสดง" trim="true">
                    <script type="dojo/method" event="onKeyPress" args="e">
                        if(e.keyCode == dojo.keys.ENTER){

                            var queryStr = this.get("displayedValue");
                            var gridId = 'lotListGrid';
                            
                            var attributes = new Array();
                            attributes[0] = 'drug_lot_name';
                            attributes[1] = 'drug_lot_desc';
                            attributes[2] = 'drug_lot_date';
                            attributes[3] = 'update_datetime';
                            
                            lib = new DojoLib();
                            lib.filterGridByTextbox(attributes, 'searchIngridTxtBox', gridId);
                        }
                    </script>
                </div>
            </td>
        </tr>
    </table>
    <hr class="line"/>
    <!--button on top-->
    <div width="100%" style="text-align: right;">
        <button type="button" dojoType="dijit.form.Button"
                onclick="dijit.byId('workPane').set('href', 'htmls/manage_lot/lot_form.php');" >
            <label>เพิ่ม</label>
        </button>
    </div>

    <!--grid data-->
    <table dojoType="dojox.grid.EnhancedGrid" id="lotListGrid"
           escapeHTMLInData="false" style="width:100%;" autoHeight="true"
           plugins="{nestedSorting: false, indirectSelection: true, pagination:true}">
        <thead>
            <tr>
                <th field="drug_lot_id" hidden="true">drugLotId</th>
                <th field="drug_lot_name" width="20%" align="center">ล็อต</th>
                <th field="drug_lot_desc" width="40%">รายละเอียด</th>
                <th field="drug_lot_date" width="15%">วันล็อต</th>
                <th field="update_datetime" width="15%">วันที่แก้ไข</th>
                <th field="drug_lot_id" width="10%" formatter="drugLotDisplayEditAndDeleteBtn">-</th>
            </tr>
        </thead>
    </table>

    <script type="dojo/method">
        var lib = new DojoLib();
        lib.loadJsWithHandleFunc('scripts/manage_lot.js', function(){
            refereshLotListGrid();
        });
    </script>
</div>